'use strict';

let koa=require('koa');
let bodyparser=require('koa-bodyparser');
let controller=require('./controllers');
let temp=require('./templating');


let app=new koa();
app.use(bodyparser());
app.use(temp);
app.use(controller());

app.use(async (ctx,next)=>{
    ctx.render('hello.html',{name:"陈泳洲",id:'1922010106'});
})

let port=3001;
app.listen(port)
console.log(`http://127.0.0.1:${port}`);